package com.hefei.customer.service.impl;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.hefei.api.customer.manager.ICustomerManager;
import com.hefei.api.customer.manager.impl.CustomerManager;
import com.hefei.api.customer.vo.Customer;


import com.hefei.common.exception.ClientException;
import com.hefei.customer.service.ICustomerService;






@Service
public class CustomerService implements ICustomerService{
	
	private Logger logger = Logger.getLogger(CustomerService.class);
	
	private ICustomerManager customerManager = new CustomerManager();

	@Override
	public String saveCustomerInfo(Customer customer) {
		String returnCode = null;
		try {
			returnCode = customerManager.saveCustomerInfo(customer);
		} catch (ClientException e) {
			
			e.printStackTrace();
		}
		
		return returnCode;
	}

	@Override
	public String editCustomerInfo(Customer customer) {
		String returnCode = null;
		try {
			returnCode = customerManager.editCustomerInfo(customer);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return returnCode;
	}

	@Override
	public String deleteCustomerInfo(int customerId) {
		String returnCode = null;
		try {
			returnCode = customerManager.deleteCustomerInfo(customerId);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return returnCode;
	}
	

	
	
	

}
